<template>
	<view>
		<template v-if="config.formType == 1">
			<copmeFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'COPMEFlow'" />
			<!-- 录入委外工单(流程) -->
			<moctaFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'MOCTAFlow'" />
			<!-- 采购单(流程) 智 -->
			<purtcflow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PURTCFLOW'" />
			<asttmFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'ASTTMFlow'" />
			<purteFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PURTEFlow'" />
			<coptaFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'COPTA01'" />
			<!-- 订单示例 智-->
			<crmOrder ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'crmOrder'" />
			<!-- 请假申请 智-->
			<leaveApply ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'leaveApply'" />
			<!-- 销售订单 智-->
			<salesOrder ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'salesOrder'" />
			<!-- 录入请购单(流程) 智-->
			<purtaFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PURTAFlow'" />
			<!-- 资产请购单 智 	ASTTIFlow-->
			<asttiFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'ASTTIFlow'" />
			<!-- 录入核价单（流程） 智-->
			<purtlFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PURTLFlow'" />
			<!-- 委外核价单 智-->
			<mociFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'MOCI10_Flow'" />
			<!-- 供应商流程 智-->
			<yydPurma ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'YYDPURMA'" />
			<!-- 录入客户订单(含流程) 智-->
			<coptcFlow ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'COPTCflow'" />
			<!-- 录入库存交易单 智-->
			<invta ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'INVTA'" />
			<!-- 月结付款申请 智-->
			<apsta ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'APSTA'" />
			<!-- 报价管理   Pjswa 智-->
			<pjswa ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'Pjswa'" />
			<!-- 录入预付款单(流程) 智-->
			<advancePaymentWithFlow ref="form" @eventReceiver="eventReceiver"
				v-if="config.enCode === 'advancePaymentWithFlow'" />
			<!-- 项目立项 PJSTA_ZZ 智-->
			<pjstazz ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSTA_ZZ'" />
			<!-- 项目计划 pjstnD 智-->
			<pjstnd ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'pjstnD'" />
			<!-- 项目子计划 psjtbD 智-->
			<psjtbd ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'psjtbD'" />
			<!-- PID图的制作 PJSXZ 智-->
			<psjxz ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXZ'" />
			<!-- 初版布局图 PJSYF 智-->
			<pjsyf ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSYF'" />
			<!-- IO表 PJSXX 智-->
			<pjsxx ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXX'" />
			<!-- IO表 PJSYB 智-->
			<pjsyb ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSYB'" />
			<!-- IO表 PJSYO 智-->
			<pjsyo ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSYO'" />
			<!-- 现场电气BOM表 PJSYJ 智-->
			<pjsyj ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSYJ'" />
			<!-- 电缆敷设表 PJSYQ 智-->
			<pjsyq ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSYQ'" />
			<!-- 设备设计图 PJSZU 智-->
			<pjszu ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSZU'" />
			<!-- 钢构设计图 PJSZX 智-->
			<pjszx ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSZX'" />
			<!-- BIM设计图 PJSZZ 智-->
			<pjszz ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSZZ'" />
			<!-- 安装设计图 PJTAH-->
			<pjtah ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJTAH'" />
			<!-- 施工队确认 PJTAI 智-->
			<pjtai ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJTAI'" />
			<!-- 现场勘察 PJSXC 智-->
			<pjsxc ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXC'" />
			<!-- 技术/安全交底 PJSWC 智-->
			<pjswc ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWC'" />
			<!-- 来料验收 PJSWH 智-->
			<pjswh ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWH'" />
			<!-- 钢构安装 PJSXD 智-->
			<pjsxd ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXD'" />
			<!-- 设备&机柜安装定位 PJSXI 智-->
			<pjsxi ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXI'" />
			<!-- 管理员的管道&支架安装 PJSXM 智-->
			<pjsxm ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXM'" />
			<!-- 桥架安装 PJSXV 智-->
			<pjsxv ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXV'" />
			<!-- 水电气安装 PJSXT 智-->
			<pjsxt ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXT'" />
			<!-- 水电气安装 PJSXR 智-->
			<pjsxr ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSXR'" />
			<!-- 设备对点 PJSWK 智-->
			<pjswk ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWK'" />
			<!-- 设备调试 PJSWP 智-->
			<pjswp ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWP'" />
			<!-- 客户培训 PJSWX 智-->
			<pjswx ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWX'" />
			<!-- 客户培训 PJTAJ 智-->
			<pjtaj ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJTAJ'" />
			<!-- 陪产 PJSWV 智-->
			<pjswv ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWV'" />
			<!-- 项目总结 PJSWZ 智-->
			<pjswz ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWZ'" />
			<!-- 项目验收 PJSWY 智-->
			<pjswy ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'PJSWY'" />
			<!-- 录入BOM单 BOMCA_ZZ 智-->
			<bomcazz ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'BOMCA_ZZ'" />
			<!-- 录入BOM变更单 BOMTA 智-->
			<bomta ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'BOMTA'" />
			<!-- 录入BOM单流程 BOMCAFlow 智-->
			<bomca ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'BOMCAFlow'" />
			<!-- 费用预算 OASTE 智-->
			<oaste ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'OASTE'" />
			<!-- 费用申请单 OASTG 智-->
			<oastg ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'OASTG'" />
			<!-- 费用申请单 OASTA 智-->
			<oasta ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'OASTA'" />
			<!-- 借款单 OASTI 智-->
			<oasti ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'OASTI'" />
			<!-- 还款单 OASTL 智-->
			<oastl ref="form" @eventReceiver="eventReceiver" v-if="config.enCode === 'OASTL'" />
		</template>
		<template v-else>
			<dynamicForm ref="form" @eventReceiver="eventReceiver" @setBtnLoad="setBtnLoad" />
		</template>
	</view>
</template>

<script>
	import dynamicForm from "@/pages/workFlow/workFlowForm/dynamicForm";
	import salesOrder from "@/pages/workFlow/workFlowForm/salesOrder";
	import purtaFlow from "@/pages/workFlow/workFlowForm/purtaFlow";
	import leaveApply from "@/pages/workFlow/workFlowForm/leaveApply";
	import crmOrder from "@/pages/workFlow/workFlowForm/crmOrder";
	import purtcflow from "@/pages/workFlow/workFlowForm/purtcflow";
	import asttiFlow from "@/pages/workFlow/workFlowForm/asttiFlow";
	import moctaFlow from "@/pages/workFlow/workFlowForm/moctaFlow";
	import asttmFlow from "@/pages/workFlow/workFlowForm/asttmFlow";
	import purteFlow from "@/pages/workFlow/workFlowForm/purteFlow";
	import purtlFlow from "@/pages/workFlow/workFlowForm/purtlFlow";
	import mociFlow from "@/pages/workFlow/workFlowForm/mociFlow";
	import yydPurma from "@/pages/workFlow/workFlowForm/yydPurma";
	import copmeFlow from "@/pages/workFlow/workFlowForm/copmeFlow";
	import coptcFlow from "@/pages/workFlow/workFlowForm/coptcFlow";
	import coptaFlow from "@/pages/workFlow/workFlowForm/coptaFlow";
	import invta from "@/pages/workFlow/workFlowForm/invta";
	import apsta from "@/pages/workFlow/workFlowForm/apsta";
	import pjswa from "@/pages/workFlow/workFlowForm/pjswa";
	import advancePaymentWithFlow from "@/pages/workFlow/workFlowForm/advancePaymentWithFlow";
	import pjstazz from "@/pages/workFlow/workFlowForm/pjstazz";
	import pjstnd from "@/pages/workFlow/workFlowForm/pjstnd";
	import psjtbd from "@/pages/workFlow/workFlowForm/psjtbd";
	import psjxz from "@/pages/workFlow/workFlowForm/psjxz";
	import pjsyf from "@/pages/workFlow/workFlowForm/pjsyf";
	import pjsxx from "@/pages/workFlow/workFlowForm/pjsxx";
	import pjsyb from "@/pages/workFlow/workFlowForm/pjsyb";
	import pjsyo from "@/pages/workFlow/workFlowForm/pjsyo";
	import pjsyj from "@/pages/workFlow/workFlowForm/pjsyj";
	import pjsyq from "@/pages/workFlow/workFlowForm/pjsyq";
	import pjszu from "@/pages/workFlow/workFlowForm/pjszu";
	import pjszx from "@/pages/workFlow/workFlowForm/pjszx";
	import pjszz from "@/pages/workFlow/workFlowForm/pjszz";
	import pjtah from "@/pages/workFlow/workFlowForm/pjtah";
	import pjtai from "@/pages/workFlow/workFlowForm/pjtai";
	import pjsxc from "@/pages/workFlow/workFlowForm/pjsxc";
	import pjswc from "@/pages/workFlow/workFlowForm/pjswc";
	import pjswh from "@/pages/workFlow/workFlowForm/pjswh";
	import pjsxd from "@/pages/workFlow/workFlowForm/pjsxd";
	import pjsxi from "@/pages/workFlow/workFlowForm/pjsxi";
	import pjsxm from "@/pages/workFlow/workFlowForm/pjsxm";
	import pjsxv from "@/pages/workFlow/workFlowForm/pjsxv";
	import pjsxt from "@/pages/workFlow/workFlowForm/pjsxt";
	import pjsxr from "@/pages/workFlow/workFlowForm/pjsxr";
	import pjswk from "@/pages/workFlow/workFlowForm/pjswk";
	import pjswp from "@/pages/workFlow/workFlowForm/pjswp";
	import pjswx from "@/pages/workFlow/workFlowForm/pjswx";
	import pjtaj from "@/pages/workFlow/workFlowForm/pjtaj";
	import pjswv from "@/pages/workFlow/workFlowForm/pjswv";
	import pjswz from "@/pages/workFlow/workFlowForm/pjswz";
	import pjswy from "@/pages/workFlow/workFlowForm/pjswy";
	import bomcazz from "@/pages/workFlow/workFlowForm/bomcazz";
	import bomta from "@/pages/workFlow/workFlowForm/bomta";
	import bomca from "@/pages/workFlow/workFlowForm/bomca";
	import oaste from "@/pages/workFlow/workFlowForm/oaste";
	import oastg from "@/pages/workFlow/workFlowForm/oastg";
	import oasta from "@/pages/workFlow/workFlowForm/oasta";
	import oasti from "@/pages/workFlow/workFlowForm/oasti";
	import oastl from "@/pages/workFlow/workFlowForm/oastl";
	export default {
		components: {
			crmOrder,
			dynamicForm,
			leaveApply,
			salesOrder,
			purtaFlow,
			purtcflow,
			asttiFlow,
			moctaFlow,
			asttmFlow,
			purteFlow,
			purtlFlow,
			mociFlow,
			yydPurma,
			copmeFlow,
			coptcFlow,
			coptaFlow,
			invta,
			apsta,
			advancePaymentWithFlow,
			pjswa,
			pjstazz,
			pjstnd,
			psjtbd,
			psjxz,
			pjsyf,
			pjsxx,
			pjsyb,
			pjsyo,
			pjsyj,
			pjsyq,
			pjszu,
			pjszx,
			pjszz,
			pjtah,
			pjtai,
			pjsxc,
			pjswc,
			pjswh,
			pjsxd,
			pjsxi,
			pjsxm,
			pjsxv,
			pjsxt,
			pjsxr,
			pjswk,
			pjswp,
			pjswx,
			pjtaj,
			pjswv,
			pjswz,
			pjswy,
			bomcazz,
			bomta,
			bomca,
			oaste,
			oastg,
			oasta,
			oasti,
			oastl,
		},
		props: {
			config: {
				type: Object,
				default: () => {},
			},

		},
		onShow() {
			console.log('define.companyName', define);
		},
		methods: {
			eventReceiver(formData, eventType) {
				// 这里是给智子.index传的方法
				this.$emit("eventReceiver", formData, eventType);
			},
			setBtnLoad(val) {
				this.$emit("setBtnLoad", val);
			},
		},
	};
</script>